﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace _07.ShortestPathWeightedDirectedGraph
{
    class ShortestPathWeightedDirectedGraph
    {
        static void Main(string[] args)
        {
            IDictionary<int,int>[] nodes = new Dictionary<int, int>[8];
            nodes[0] = new Dictionary<int, int>();
            nodes[0].Add(1, 20);
            nodes[0].Add(3, 80);
            nodes[0].Add(6, 90);
            nodes[1] = new Dictionary<int, int>();
            nodes[1].Add(5, 10);
            nodes[2] = new Dictionary<int, int>();
            nodes[2].Add(3, 10);
            nodes[2].Add(5, 50);
            nodes[2].Add(7, 20);
            nodes[3] = new Dictionary<int, int>();
            nodes[3].Add(2, 10);
            nodes[3].Add(6, 20);
            nodes[4] = new Dictionary<int, int>();
            nodes[4].Add(1, 50);
            nodes[4].Add(6, 30);
            nodes[5] = new Dictionary<int, int>();
            nodes[5].Add(2, 10);
            nodes[5].Add(3, 40);
            nodes[6] = new Dictionary<int, int>();
            nodes[6].Add(0, 20);
            nodes[7] = new Dictionary<int, int>();

            Graph graph = new Graph(nodes);

            graph.FindShortestPaths(0);
        }
    }
}
